//    Copyright (C) Kherty.  All rights reserved.


using System.Windows.Controls;
using System.Windows.Input;

namespace OpenLS.UI.Themes
{
    partial class MenuItemResources
    {
        public MenuItemResources()
        {
            InitializeComponent();
        }

        private static readonly MenuItemResources Singleton = new MenuItemResources();
        public static ControlTemplate SubmenuHeaderNoCommandTemplate
        {
            get
            {
                return (ControlTemplate) Singleton["SubmenuHeaderNoCommandTemplateKey"];
            }
        }
        public static ControlTemplate SubmenuHeaderTemplate
        { get { return (ControlTemplate) Singleton["SubmenuHeaderTemplateKey"]; } }
        public static ControlTemplate TopLevelHeaderSmallTemplateKeyNoCommand
        {
            get { return (ControlTemplate) Singleton["TopLevelHeaderSmallTemplateKeyNoCommand"]; }
        }
        public static ControlTemplate TopLevelItemTemplate
        {
            get { return (ControlTemplate)Singleton["TopLevelItemTemplateKey"]; }
        }
        public static ControlTemplate TopLevelHeaderSmallTemplate { get { return (ControlTemplate)Singleton["TopLevelHeaderSmallTemplateKey"]; } }

          private void FrameworkElement_OnLoaded(object sender, System.Windows.RoutedEventArgs e)
        {

        }

          private void MenuItemPreviousMouseLeftButtonUp(object sender, System.Windows.Input.MouseButtonEventArgs e)
          {
              var b = (Button) sender;
              ICommand cmd = b.Command;
              if (cmd == null)
                  return;
              cmd.Execute(b.CommandParameter);
          }
    }
}
